<template>
    <div class="head">
        <div class="head-nav">
            <span class="iconfont back-icon nav-left">&#xe624;</span>
            <div class="nav-input">
                <span class="iconfont back-icon input">&#58930;</span>
                <input type="text ">
            </div>
            <span class="iconfont back-icon nav-rigth" @click="ToCity">&#58954;&nbsp;{{$store.state.city}}</span>
        </div>
    </div>
</template>

<script>
export default {
  name: "HomeHead",
  props:['city'],
  methods:{
    ToCity(){
      this.$router.push('/city')
      console.log(this.$store.state.city)
    }
  }
};
</script>

<style scoped>
.head-nav {
  display: flex;
  flex-direction: row;
  height: 0.8rem;
  background-color: darkcyan;
  justify-content: space-between;
  align-items: center;
}
.head-nav input {
  width: 4.8rem;
  height: 0.5rem;
  border-radius: 5px;
  color: #666;
  padding-left: 0.6rem;
  box-sizing: border-box;
}
.nav-input{
    position: relative;
}
.input{
    position: absolute;
    left: 0.2rem;
    margin-top: 0.1rem;
}
.head-nav .nav-left {
  margin-left: 10px;
}
.head-nav .nav-rigth {
  margin-right: 10px;
}
</style>